<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
	<title>后台管理 - 易买网</title>
	<link type="text/css" rel="stylesheet" href="../css/style.css" />
	<script type="text/javascript" src="../scripts/function-manage.js"></script>
</head>
<body>
<%@include file="nav.jsp"%>
<div id="position" class="wrap">
	您现在的位置：<a href="index.jsp">易买网</a> &gt; 管理后台
</div>
<div id="main" class="wrap">
	<%@include file="left.jsp"%>
	<div class="main">
		<h2>用户管理</h2>
		<div class="manage">
			<table class="list">
				<tr>
					<th>ID</th>
					<th>姓名</th>
					<th>性别</th>
					<th>Email</th>
					<th>手机</th>
					<th>操作</th>
				</tr>
				<c:forEach var="user" items="${list}">
					<tr>
						<td class="first w4 c">${user.eu_user_id}</td>
						<td>${user.eu_user_name}</td>
						<td>${user.eu_sex}</td>
						<td>${user.eu_email}</td>
						<td>${user.eu_mobile}</td>
						<td class="w1 c">
							<a href="userSelectById?id=${user.eu_user_id}&pageIndex=${pageIndex}">修改</a>
							<a href="javascript:myDelete('${user.eu_user_id}',${pageIndex})">删除</a>
						</td>
					</tr>
				</c:forEach>
			</table>
		</div>
		<div class="pager">
			<ul class="clearfix">
				<c:if test="${pageIndex != 1}">
					<li><a href="userSelectByPage?pageIndex=1">首页</a></li>
					<li><a href="userSelectByPage?pageIndex=${pageIndex-1}">上一页</a></li>
				</c:if>
				<li class="current">${pageIndex}/${maxPage}</li>
				<c:if test="${pageIndex != maxPage}">
					<li><a href="userSelectByPage?pageIndex=${pageIndex+1}">下一页</a></li>
					<li><a href="userSelectByPage?pageIndex=${maxPage}">末页</a></li>
				</c:if>
			</ul>
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">
	Copyright &copy; 2022 卓京教育 All Rights Reserved. 湘ICP证1001号
</div>
<script type="text/javascript">
	function myDelete(id, pageIndex) {
		if (confirm("确认要删除吗？")) {
			window.location.href = "userDelete?id=" + id + "&pageIndex=" + pageIndex;
		}
	}
</script>
</body>
</html>
